package cn.cljh.day7_20.classCase;

public class Test {
    public static int factorial(int n){
        if(n < 1)
            return 1;
        return factorial(n-1) * n;
    }

    public static void main(String[] args) {
        int factorial = factorial(3);
        System.out.println(factorial);
    }
}
